/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package unc.pds.data;

import java.sql.PreparedStatement;

/**
 *
 * @author ain
 */
public class Consts {
    public static boolean DEBUG_MODE = false;
    //строки отвечающие за названия колонок в таблицах:
    public static String OBJECT_TYPES__TABLENAME = "OBJECT_TYPES";
    public static String OBJECT_TYPES__NAME = "NAME";
    public static String OBJECT_TYPES__ID = "OBJECT_TYPE_ID";

    public static String PARAMS_TABLENAME = "PARAMS";
    public static String PARAMS__OBJECT_ID = "OBJECT_ID";
    public static String PARAMS__ATTRIBUTE_ID = "ATTRIBUTE_ID";
    public static String PARAMS__VALUE = "VALUE";

    public static String CONTENT__OBJECT_ID = "OBJECT_ID";
    public static String CONTENT__ATTRIBUTE_ID = "ATTRIBUTE_ID";
    public static String CONTENT__VALUE = "VALUE";

    public static String OBJECTS__TABLENAME = "OBJECTS";
    public static String OBJECTS__OBJECT_ID = "OBJECT_ID";
    public static String OBJECTS__PARENT_ID = "PARENT_ID";
    public static String OBJECTS__OBJECT_TYPE_ID = "OBJECT_TYPE_ID";
    public static String OBJECTS__NAME = "NAME";
    public static String OBJECTS__TIME = "ATIME";

    public static String ATTRIBUTES__ATTRIBUTE_ID = "ATTRIBUTE_ID";
    //**************************************************
    public static String ARCH_F_TYPE = "afTYPE";
    public static String ARCH_F_NAME = "afNAME";
    public static String ARCH_F_PARENT = "afPARENT";
    //отвечает за типы сущностей, с которыми работает система.
    //типы сущностей, перечисленные здесь должны быть в таблице OBJECT_TYPES
    public static String OBJECT_TYPE__USER = "user";
    public static String OBJECT_TYPE__GROUP = "group";
    public static String OBJECT_TYPE__MARGROUP = "mgroup";
    public static String OBJECT_TYPE__DIARY = "diary";
    public static String OBJECT_TYPE__COMMENT = "comment";
    public static String OBJECT_TYPE__ALBUM = "album";
    public static String OBJECT_TYPE__PHOTO = "photo";
    public static String OBJECT_TYPE__FILE = "file";
    public static String OBJECT_TYPE__FOLDER = "folder";
    public static String OBJECT_TYPE__ROLE = "role";
    //список аттрибутов для сущностей, что бы не работать с номерами сущностей внутри системы
    public static String ATTR__AUTHOR = "author";

    public static String ATTR__USER_NOTINITIAL = "notinit";
    public static String ATTR__USER_PASSWORD = "password";
    public static String ATTR__USER_NICKNAME = "name";
    public static String ATTR__USER_EMAIL = "email";
    public static String ATTR__USER_NAME = "uname";
    public static String ATTR__USER_SERNAME = "username";
    public static String ATTR__USER_DIARY = "diary";
    public static String ATTR__USER_FRIEND = "friend";
    public static String ATTR__USER_NEWFRIEND = "new_friend";
    public static String ATTR__USER_WANNEDFRIEND = "wanted_friend";
    public static String ATTR__USER_BANFRIEND = "ban_friend";
    public static String ATTR__USER_MEMBER_OF = "member_of";
    public static String ATTR__USER_NEWGROUP = "new_group";
    public static String ATTR__USER_WANTEDGROUP = "wanted_group";

    public static String ATTR__MARGROUP_NAME = "name";

    public static String ATTR__GROUP_NAME = "name";
    public static String ATTR__GROUP_MODERATOR = "moderator";                       //*
    public static String ATTR__GROUP_MEMBER = "member";                             //*
    public static String ATTR__GROUP_BANNEDMEMBER = "banned_member";                //*
    public static String ATTR__GROUP_WANTEDMEMBER = "wanted_member";                //*
    public static String ATTR__GROUP_NEWMEMBER = "new_member";                      //*

    public static String ATTR__ROLE_NAME = "name";
    public static String ATTR__ROLE_LEVEL = "level";

    public static String ATTR__DIARY_CAPTION = "caption";
    public static String ATTR__DIARY_AUTHOR = "author";
    public static String ATTR__DIARY_CONTEXT = "context";

    public static String ATTR__COMMENT_PARENT = "parent";
    public static String ATTR__COMMENT_CAPTION = "caption";
    public static String ATTR__COMMENT_AUTHOR = "author";

    public static String ATTR__ALBUM_NAME = "name";
    public static String ATTR__ALBUM_AUTHOR = "author";
    public static String ATTR__ALBUM_CONTEXT = "context";

    public static String ATTR__PHOTO_NAME = "name";
    public static String ATTR__PHOTO_AUTHOR = "author";
    public static String ATTR__PHOTO_CONTEXT = "context";

    public static String ATTR__FILE_NAME = "name";
    public static String ATTR__FILE_AUTHOR = "author";
    public static String ATTR__FILE_CONTEXT = "context";

    public static String ATTR__FOLDER_NAME = "name";
    public static String ATTR__FOLDER_AUTHOR = "author";
    public static String ATTR__FOLDER_CONTEXT = "context";
    //список контента для сущностей. Предположительно аттавизм, так как
    //врядли у обной сущности будет несколько наборов контента
    public static String CONT__DIARY_POST = "post";
    public static String CONT__COMMENT_POST = "comment";
    //public static String CHILD = "child";
    //public static String CHILD_NAME = "name";
    //public static String CHILD_VAL = "value";
    public static String USER_AUTH_KEY = "user";

    public static String ROLE_ADMIN = "admin";
    public static String ROLE_OWNER = "owner";
    public static String ROLE_NONE = "none";
    public static String ROLE_FRIEND = "friend";
    public static String ROLE_WANNEDFRIEND = "wannedfriend";
    public static String ROLE_ANY = "any";
    public static String ROLE_BANNED = "banned";

    public static int ROLE_LEVEL_SYSTEM = 0;
    public static int ROLE_LEVEL_USER = 1;
    public static int ROLE_LEVEL_DIARY = 2;
    public static int ROLE_LEVEL_ALBUM = 2;
    public static int ROLE_LEVEL_FOLDER = 2;
    public static int ROLE_LEVEL_FILE = 3;
    public static int ROLE_LEVEL_PHOTO = 3;
    public static int ROLE_LEVEL_COMMENT = 4;
}
